<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Class: PanoramicAndSceneSync</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Class: PanoramicAndSceneSync</h1>

    




<section>

<header>
    
        <h2><span class="attribs"><span class="type-signature"></span></span>PanoramicAndSceneSync<span class="signature">(containerDiv, overlay)</span><span class="type-signature"></span></h2>
        
            <div class="class-description">全景图和三维场景同步联动</div>
        
    
</header>

<article>
    <div class="container-overview">
    
        

    
    <h2>Constructor</h2>
    

    
    <h4 class="name" id="PanoramicAndSceneSync"><span class="type-signature"></span>new PanoramicAndSceneSync<span class="signature">(containerDiv, overlay)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    构造函数
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>containerDiv</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            
                <td class="default">
                
                </td>
            

            <td class="description last">containerDiv 容器Div，在默认的左右分屏模式下，将该DIV左右平分，左边为全景图，右边为三维场景，自动实现左右联动</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>overlay</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last">左右分屏模式还是覆盖重叠模式，默认是false，即左右分屏模式</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















    
    </div>

    

    

    

    

    

    

    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    
    <h4 class="name" id="addPOI"><span class="type-signature"></span>addPOI<span class="signature">(poi)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    添加POI热点，可在楼层导航图控件创建完毕后调用
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>poi</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>



















    <h5>Example</h5>
    
    <pre class="prettyprint"><code>{     id:POI ID，必须，可以是String或Number     name:POI名称，用于鼠标悬浮在热点图标上显示的文字，必须     position:POI在三维模型中的位置,必须, THREE.Vector3对象      imageUrl:POI的图标,图标为20x20尺寸。非必须，不填就使用bimi自带的蓝色POI图标     imageOffsetX:POI图标X偏移，默认是10     imageOffsetY:POI图标Y偏移，默认是10     data: 热点对应的全景图和三维场景的数据对象，当点击POI图标时，切换到该数据,必须参数     {         image:'temp/sky-box-master/1235.jpg',         bim:'temp/半径项目Revit文件/bim.bin' ,         defaultQuaternion:{"x":-0.06635499364895026,"y":0.11403174830228421,"z":0.007633527392872102,"w":0.9912292895473359},         position:new THREE.Vector3(-43.0,16.55,6.491),         pitch: 0,         yaw:75     }}</code></pre>



        
            

    

    
    <h4 class="name" id="changeLevel"><span class="type-signature"></span>changeLevel<span class="signature">(options)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    切换楼层，也支持同时切换全景图和模型
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">{     image:'temp/sky-box-master/1235.jpg' 全景图图片url,如果不需要切换全景图，可不填     bim:'temp/半径项目Revit文件/bim.bin' 三维模型资源url，如果不需要切换三维模型，可不填     defaultQuaternion:{"x":0,"y":0,"z":0,"w":1}  全景图默认视角四元数，非必要参数，如果不需要切换全景图，可不填     position:Vector3对象 ，全景图对应三维场景的位置，如果不需要切换三维模型，可不填     pitch:绕X轴角度,非必要参数，如果不需要切换三维模型，可不填     yaw:绕Y轴角度,非必要参数，如果不需要切换三维模型，可不填     level:楼层导航图数据对象，必填参数     {         dataUrl:模型楼层导航图数据url         level:指定当前楼层     }     poi:该楼层对应的热点数组数据,可选参数，如果不填，那么楼层图上将没有热点     [         {             id:108,             name:'1F的某个热点',             data:             {                 image:'sky-box-master/1235.jpg',                 bim:'半径项目Revit文件/bim.bin' ,                 defaultQuaternion:{"x":-0.06635499364895026,"y":0.11403174830228421,"z":0.007633527392872102,"w":0.9912292895473359},                 position:new THREE.Vector3(-43.0,16.55,6.491),                 pitch: 0,                 yaw:75             }          },      ]}</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="changePanoramic"><span class="type-signature"></span>changePanoramic<span class="signature">(options)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    切换全景图
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>



















    <h5>Example</h5>
    
    <pre class="prettyprint"><code>{     image:'temp/sky-box-master/1235.jpg' 全景图图片url     bim:'temp/半径项目Revit文件/bim.bin' 三维模型资源url     defaultQuaternion:{"x":0,"y":0,"z":0,"w":1}  全景图默认视角四元数，非必要参数     position:Vector3对象 ，全景图对应三维场景的位置     pitch:绕X轴角度,非必要参数     yaw:绕Y轴角度,非必要参数}</code></pre>



        
            

    

    
    <h4 class="name" id="dispose"><span class="type-signature"></span>dispose<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    销毁资源
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="init"><span class="type-signature"></span>init<span class="signature">(options)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    初始化全景图和三维场景
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>



















    <h5>Example</h5>
    
    <pre class="prettyprint"><code>{     image:'temp/sky-box-master/1235.jpg' 全景图图片url     bim:'temp/半径项目Revit文件/bim.bin' 三维模型资源url     defaultQuaternion:{"x":0,"y":0,"z":0,"w":1}  全景图默认视角四元数，非必要参数     position:Vector3对象 ，全景图对应三维场景的位置     pitch:绕X轴角度,非必要参数     yaw:绕Y轴角度,非必要参数     level:楼层导航图数据对象，非必要参数     {         containerDiv:楼层导航图的容器Dom对象,最终楼层导航图会自动放置于该Dom中         dataUrl:模型楼层导航图数据url         level:指定当前楼层     }     poi:楼层导航图上的POI热点数组，非必要参数，注意如果设置poi参数，那么必须也设置level参数，因为POI热点是依赖于楼层导航图的     [         {             id:POI ID，必须，可以是String或Number             name:POI名称，用于鼠标悬浮在热点图标上显示的文字，必须             position:POI在三维模型中的位置,必须, THREE.Vector3对象              imageUrl:POI的图标,图标为20x20尺寸。非必须，不填就使用bimi自带的蓝色POI图标             imageOffsetX:POI图标X偏移，默认是10             imageOffsetY:POI图标Y偏移，默认是10             data: 热点对应的全景图和三维场景的数据对象，当点击POI图标时，切换到该数据,必须参数             {                 image:'temp/sky-box-master/1235.jpg',                 bim:'temp/半径项目Revit文件/bim.bin' ,                 defaultQuaternion:{"x":-0.06635499364895026,"y":0.11403174830228421,"z":0.007633527392872102,"w":0.9912292895473359},                 position:new THREE.Vector3(-43.0,16.55,6.491),                 pitch: 0,                 yaw:75             }         }     ]}</code></pre>



        
            

    

    
    <h4 class="name" id="removePOI"><span class="type-signature"></span>removePOI<span class="signature">(id)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    移除POI热点
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>id</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">POI id</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="setLayout"><span class="type-signature"></span>setLayout<span class="signature">(overlay)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    设置布局为左右分隔还是覆盖
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>overlay</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last">是否覆盖，默认是false</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="setOverlayOpacity"><span class="type-signature"></span>setOverlayOpacity<span class="signature">(opacity)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    设置覆盖模式下，全景图的透明度
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>opacity</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            
                <td class="default">
                
                    1
                
                </td>
            

            <td class="description last">全景图透明度，默认是1.0</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="setPanoramicDefaultQuaternion"><span class="type-signature"></span>setPanoramicDefaultQuaternion<span class="signature">(quaternion)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    设置全景图默认视角四元数
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>quaternion</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>



















    <h5>Example</h5>
    
    <pre class="prettyprint"><code>quaternion数据定义如下:{"x":0,"y":0,"z":0,"w":1}</code></pre>



        
            

    

    
    <h4 class="name" id="setPositionPitchYaw"><span class="type-signature"></span>setPositionPitchYaw<span class="signature">(position, pitch, yaw)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    三维场景定位的位置调整参数
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>position</code></td>
            

            <td class="type">
            
                
<span class="param-type">THREE.Vector3</span>


            
            </td>

            

            
                <td class="default">
                
                </td>
            

            <td class="description last">定位坐标</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pitch</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description last">绕X轴角度</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>yaw</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description last">绕Y轴角度</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="updateOrbit"><span class="type-signature"></span>updateOrbit<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    更新视角，再调用setPositionPitchYaw()后需要调用此函数更新场景视角
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




















        
    

    

    
</article>

</section>




</div>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AnnotationPlugin.html">AnnotationPlugin</a></li><li><a href="BillboardPlugin.html">BillboardPlugin</a></li><li><a href="BimViewer.html">BimViewer</a></li><li><a href="CircleWaveMeshPlugin.html">CircleWaveMeshPlugin</a></li><li><a href="CircleWavePlugin.html">CircleWavePlugin</a></li><li><a href="ClipBoxPlugin.html">ClipBoxPlugin</a></li><li><a href="ClipPlugin.html">ClipPlugin</a></li><li><a href="CommonTools.html">CommonTools</a></li><li><a href="CustomModel.html">CustomModel</a></li><li><a href="EdgePlugin.html">EdgePlugin</a></li><li><a href="ExplodePlugin.html">ExplodePlugin</a></li><li><a href="FencePlugin.html">FencePlugin</a></li><li><a href="FireClotPlugin.html">FireClotPlugin</a></li><li><a href="FirePlanPlugin.html">FirePlanPlugin</a></li><li><a href="FirePlugin.html">FirePlugin</a></li><li><a href="FlashPlugin.html">FlashPlugin</a></li><li><a href="FlyPlugin.html">FlyPlugin</a></li><li><a href="FpsPlugin.html">FpsPlugin</a></li><li><a href="GroundPlugin.html">GroundPlugin</a></li><li><a href="HeatmapCanvas.html">HeatmapCanvas</a></li><li><a href="HeatmapGridPlugin.html">HeatmapGridPlugin</a></li><li><a href="HeatmapPlugin.html">HeatmapPlugin</a></li><li><a href="HlsPlugin.html">HlsPlugin</a></li><li><a href="HtmlAnchorPlugin.html">HtmlAnchorPlugin</a></li><li><a href="HtmlDomPlugin.html">HtmlDomPlugin</a></li><li><a href="HtmlIconLabelPlugin.html">HtmlIconLabelPlugin</a></li><li><a href="HtmlLabelPlugin.html">HtmlLabelPlugin</a></li><li><a href="HtmlMarkerPlugin.html">HtmlMarkerPlugin</a></li><li><a href="ManPlugin.html">ManPlugin</a></li><li><a href="MapPlugin.html">MapPlugin</a></li><li><a href="MapTools.html">MapTools</a></li><li><a href="MathHelp.html">MathHelp</a></li><li><a href="MeasurePlugin.html">MeasurePlugin</a></li><li><a href="MouseCapturePlugin.html">MouseCapturePlugin</a></li><li><a href="NavigationLevelPlugin.html">NavigationLevelPlugin</a></li><li><a href="NavigationMapPlugin.html">NavigationMapPlugin</a></li><li><a href="OSGBPlugin.html">OSGBPlugin</a></li><li><a href="OutlinePlugin.html">OutlinePlugin</a></li><li><a href="PanoramicAndSceneSync.html">PanoramicAndSceneSync</a></li><li><a href="PathRoamingPlugin.html">PathRoamingPlugin</a></li><li><a href="RainMaskPlugin.html">RainMaskPlugin</a></li><li><a href="RoadGeometryUtil.html">RoadGeometryUtil</a></li><li><a href="RoadPlugin.html">RoadPlugin</a></li><li><a href="RotatePlugin.html">RotatePlugin</a></li><li><a href="RotateScenePlugin.html">RotateScenePlugin</a></li><li><a href="ScalePlugin.html">ScalePlugin</a></li><li><a href="SelectionBoxPlugin.html">SelectionBoxPlugin</a></li><li><a href="ShadowPlugin.html">ShadowPlugin</a></li><li><a href="SkyBoxPlugin.html">SkyBoxPlugin</a></li><li><a href="SmokePlugin.html">SmokePlugin</a></li><li><a href="SnowMaskPlugin.html">SnowMaskPlugin</a></li><li><a href="SpriteDomPlugin.html">SpriteDomPlugin</a></li><li><a href="SpriteLabelPlugin.html">SpriteLabelPlugin</a></li><li><a href="SpritePicturePlugin.html">SpritePicturePlugin</a></li><li><a href="SunPlugin.html">SunPlugin</a></li><li><a href="SvgCloudFrame.html">SvgCloudFrame</a></li><li><a href="SvgCloudLine.html">SvgCloudLine</a></li><li><a href="SvgEllipse.html">SvgEllipse</a></li><li><a href="SvgError.html">SvgError</a></li><li><a href="SvgLineArrow.html">SvgLineArrow</a></li><li><a href="SvgMultiplyLine.html">SvgMultiplyLine</a></li><li><a href="SvgRect.html">SvgRect</a></li><li><a href="SweepLightPlugin.html">SweepLightPlugin</a></li><li><a href="Toolbar.html">Toolbar</a></li><li><a href="TranslatePlugin.html">TranslatePlugin</a></li><li><a href="TubeFlowPlugin.html">TubeFlowPlugin</a></li><li><a href="TubeFlowWaterPlugin.html">TubeFlowWaterPlugin</a></li><li><a href="TweenTransparentPlugin.html">TweenTransparentPlugin</a></li><li><a href="UnrealBloomPlugin.html">UnrealBloomPlugin</a></li><li><a href="VideoPlugin.html">VideoPlugin</a></li><li><a href="ViewerEvent.html">ViewerEvent</a></li><li><a href="ViewerHelper.html">ViewerHelper</a></li><li><a href="Water.html">Water</a></li><li><a href="WaterPlugin.html">WaterPlugin</a></li></ul>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a> on Mon Feb 26 2024 15:45:50 GMT+0800 (中国标准时间)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>